﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using ARchGL.Platform.Organizations.Dto;

namespace ARchGL.Platform.Organizations
{
    public interface IOrganizationUnitAppService : IApplicationService
    {
        Task<PagedResultDto<OrganizationUnitDto>> GetOrganizationUnits(GetOrganizationUnitsInput input);

        Task<PagedResultDto<OrganizationUnitUserListDto>> GetOrganizationUnitUsers(GetOrganizationUnitUsersInput input);

        Task<List<OrganizationUnitUserListDto>> GetOrganizationUnitUsers(List<long> input);

        Task<OrganizationUnitDto> CreateOrganizationUnit(CreateOrganizationUnitInput input);

        Task<OrganizationUnitDto> CreateOrganizationUnitExtend(CreateOrganizationUnitInput input);

        Task<OrganizationUnitDto> UpdateOrganizationUnit(UpdateOrganizationUnitInput input);
        
        Task<OrganizationUnitDto> UpdateOrganizationUnitExtend(UpdateOrganizationUnitInput input);

        Task<OrganizationUnitDto> MoveOrganizationUnit(MoveOrganizationUnitInput input);

        Task DeleteOrganizationUnit(EntityDto<long> input);

        Task BatchDeleteOrganizationUnit(List<long> input);

        Task RemoveUserFromOrganizationUnit(UserToOrganizationUnitInput input);

        Task AddUsersToOrganizationUnit(UsersToOrganizationUnitInput input);

        Task<PagedResultDto<NameValueDto>> FindUsers(FindOrganizationUnitUsersInput input);

        Task<dynamic> QueryOrganizationUnitWithUsers(GetOrganizationUnitsInput input);
    }
}
